package com.itqf.Controller;
import com.itqf.Service.TestService;
import com.itqf.entity.Test;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class testController
{
    @Resource
    private TestService testService;

    @RequestMapping("findall")
    public String Findall(ModelMap map)
    {
    List<Test> tests= testService.Findall();
    map.addAttribute("tests",tests);
    return "test";
    }
}
